<template>
    <div class="main">
        <top ref="top" @showlogin="showlogin" ></top>

        <creatVideo></creatVideo>

        <!-- 底部 -->
        <bottom></bottom>
        <!-- 机器人 -->
        <robot></robot>
    </div>
</template>

<script>
import top from '@/components/top'
import creatVideo from '@/components/creatVideo'
import robot from '@/components/robot'
import bottom from '@/components/bottom'
import login from '@/components/login'
import videolist from '@/components/videolist'
export default {
    name: "home",
    components: {
        top,
        login,
        bottom,
        robot,
        creatVideo,
        videolist

    },
    data() {
        return {
            showLogin:false
        };
    },
    created() {
        let token = sessionStorage.getItem('token')?true:false
        this.showLogin = !token
     },
    mounted() {

    },
    methods: {
        showlogin(){
            this.showLogin = true
        },
        loginSuccess(){
            this.showLogin = false
            this.$refs.top.isLogin = true
        }
    },
};
</script>

<style lang="less" scoped>
</style>
